#!/usr/bin/python
# -*- coding: utf-8 -*


class Compare:
    def __init__(self, data):
        self.data = data

    def __eq__(self, other):
        return self.data == other.data

    def __lt__(self, other):
        return self.data < other.data

    def __gt__(self, other):
        return self.data > other.data


c1 = Compare(1)
c2 = Compare(1)
c3 = Compare(2)

print(c1 == c2)     # True
print(c1 < c3)     # True
print(c3 > c2)     # True

